package com.namuan.jp_stock.util;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.RectF;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RoundRectShape;
import android.util.AttributeSet;
import android.widget.ImageView;

public class PointImageView extends ImageView {
	 private int n = 5;
	 
	
	
	 public PointImageView(Context context,AttributeSet attrs) {
		  super(context, attrs);
		  
		 }
	 
	 
	 @Override
	 protected void onDraw(Canvas canvas) { 
	  super.onDraw(canvas);
	  float[] outerR = new float[] { n,n,n,n,n,n,n,n };
	  RectF inset = new RectF(5, 5, 5, 5); // 모서리 둥근 사각형 띠의 두께.
	  float[] innerR = new float[] { n,n,n,n,n,n,n,n };
	  ShapeDrawable mDrawables = new ShapeDrawable(new RoundRectShape(outerR, inset, innerR));
	  mDrawables.getPaint().setColor(Color.rgb(235, 235, 235));
	  mDrawables.getPaint().setAntiAlias(true);
	  mDrawables.setBounds(-2,-2,getWidth()+1, getHeight()+1);
	  mDrawables.draw(canvas);
	 }
	}